import React, { Component } from 'react';
import { SearchDiv } from './style'
import { withRouter } from 'react-router-dom'

import Storage from '@/utils/storage'

// 图片
// import search from '../../assets/images/search.png';

@withRouter
class index extends Component {

  goBack() {
    this.props.history.go(-1);
  }

  render() {
    return (
      <SearchDiv>
        {/* <div class="main-box"> */}
        <div className="search-bar">
          <div className="search">
            <input
              type="text"
              name=""
              placeholder="搜索商品，品牌"
            />
          </div>
          <div className="cancel">
            <span onClick={ () => this.goBack()}>取消</span>
          </div>
        </div>
        <div className="inner">
          <p>热门搜索</p>
          <ul className="hot">
            <li>

            </li>
          </ul>

          <p>历史搜索</p>
          <ul className="history">
            <li className="hisText">
              <span></span>
              <i></i>
            </li>
          </ul >
          <div className="clear_history" v-if="hisSearch.length > 0">
            <p>清除历史记录</p>
          </div >
        </div >
        {/* </div > */}

      </SearchDiv >
    );
  }
}

export default index;
